import wenxiwen.test.TestDemo1;
class DoClass {
    public int doat = 10;
    public int doat1 = 20;
    public static int doat2 = 30;

    class InnerClass {
        public int doat1 = 40;
        public int doat4 = 50;
        private static final int doat5 = 60;


        public InnerClass() {

            System.out.println("这是一个实例构造方法");
        }

        public void seat() {
            System.out.println(this.doat);
            System.out.println(DoClass.this.doat1);
            System.out.println("这是一个实例内部类");
        }


    }

    public void sun() {
        InnerClass innerclass = new InnerClass();
        System.out.println(innerclass.doat1);

    }
    public static void cot(){
        DoClass doclass = new DoClass();
        doclass.sun();
    }
}
public class TestDemo {
    public static void main(String[] args) {
        DoClass.InnerClass innerclass = new DoClass().new InnerClass();
        innerclass.seat();
    }
    public static void main2(String[] args) {
        DoClass doclass = new DoClass();
        DoClass.InnerClass innerclass = doclass.new InnerClass();
        doclass.sun();
       /* System.out.println(innerclass.doat1);
        System.out.println(innerclass.doat4);*/

    }
}
